<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //匿名函数格式
        let fn = function(){
            //函数主体
            console.log(666);
        }
        fn()


        //立即执行函数   避免全局变量之间的污染
        (function(){
            alert(999)
        })();    //分号结束符

        //逻辑中断
        function fn1(a,b){
            a=a||0
            b=b||0
            console.log(a+b)
        }
        fn1()

        
    </script>
</body>
</html>